package com.baiytfp.hf.HFDataExchange.action.controller.view;

import com.alibaba.fastjson.JSON;
import com.baiytfp.hf.HFDataExchange.action.service.CallLogService;
import com.baiytfp.hf.HFDataExchange.common.model.table.CallLog;
import com.baiytfp.hf.baiytfp.common.db.HFPager;
import com.baiytfp.hf.baiytfp.framework.base.BaseController;
import com.baiytfp.hf.baiytfp.hfutils.HFRequest;
import com.baiytfp.hf.baiytfp.hfutils.HFResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @program: HFDataExchange
 * @description: 接口日志视图Controller
 * @author: zhenKang
 * @create: 2018-12-06 17:55
 */
@Controller
@RequestMapping("/view/calllog")
public class CallLogVController extends BaseController {
    @Autowired
    private CallLogService callLogService;
    /**
     * 日志接口list
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
    @RequestMapping("callloglist")
    public ModelAndView loglist(HttpServletRequest request, HttpServletResponse response) throws Exception {
        ModelAndView mav = new ModelAndView();
        return mav;
    }

    /**
     * 接口日志详细
     * @param request
     * @param response
     * @throws Exception
     */
    @RequestMapping("detail")
    public ModelAndView callLogList(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String cl_id = HFRequest.getIstance().getString(request, "cl_id");
        CallLog callLog = callLogService.getById(cl_id);
        ModelAndView view = new ModelAndView();
        view.addObject("vo",callLog);
        return view;
    }


}
